<template>
  <div class="h_full w_full pagewarpper hasfooter">
    <div class="pagewapperheader bg_fff flexbetween">
      <div class="c_text2 fw-6 f-14 flexcenter">
        <img
          src="@/assets/images/arrow-circle-left.png"
          class="lefticon commhover"
          alt=""
          @click="goBack"
        />
        群详情
      </div>
    </div>
    <div class="pagewarpperbody flex mb-0">
      <!-- 左边 -->
      <div class="d_left mr-16 p-16 bg_fff br_4">
        <div class="avatar_info flexcolumn aligncenter">
          <img
            class="avatar_img mb-12"
            src="//qyb-1253970052.cos.ap-shanghai.myqcloud.com/public/wechatdata/avatar/5424982/911d5f8accccccf82969ae260334bb94.png"
            alt=""
          />
          <div class="fw-6 textcenter">群名称</div>
        </div>
        <div class="group_info p_box">
          <div class="flex c_text3 mb-8">
            <div class="item_title">群成员</div>
            <div class="item_content">1</div>
          </div>
          <div class="flex c_text3 mb-8">
            <div class="item_title">群主：</div>
            <div class="item_content">小车车</div>
          </div>
          <div class="flex c_text3 mb-8">
            <div class="item_title">管理员：</div>
            <div class="item_content">小车车</div>
          </div>
          <div class="mt-16">
            <el-button size="small" class="infobtn">对话</el-button>
            <el-button size="small" class="infobtn ml-8" @click="handleOpen">查看方案</el-button>
          </div>
        </div>
        <div class="p_box">
          <div class="fw-6 c_text2 mb-5">群公告</div>
          <EmptyData text='暂无群公告' />
        </div>
        <div class="p_box">
          <div class="fw-6 c_text2 mb-5">群标签</div>
          <div class="">
            <div
              class="tagbox f-13 br_4"
              v-for="(item, index) in tagList"
              :key="index"
            >
              {{ item }}
            </div>
          </div>
          <!-- 空 -->
          <!-- <EmptyData v-if="!tagList.length" imgurl="ic_table_empty_1.png" height='40px' /> -->
          <div v-if="!tagList.length" class="flexcolumn aligncenter mt-15">
            <img
              src="@/assets/images/ic_table_empty_1.png"
              alt=""
              style="height: 40px"
            />
            <div class="textcenter c_text4 mt-8">暂无数据</div>
          </div>
        </div>
      </div>
      <!-- 中间 -->
      <div class="d_center p-16 bg_fff br_4">
        <div class="f-16 fw-6 mb-10">群成员</div>
        <el-form
          ref="queryParams"
          :model="queryParams"
          size="small"
          :inline="true"
          class="queryform flexbetween alignend"
        >
          <div>
            <el-form-item label="" prop="keyword">
              <el-input
                placeholder="搜索昵称"
                v-model="queryParams.keyword"
                @keyup.enter.native="handleQuery"
                class="x-input-select"
                style="width: 200px"
              >
                <el-button slot="append" icon="el-icon-search"></el-button>
              </el-input>
            </el-form-item>
            <el-form-item label="" prop="keyword">
              <el-select
                v-model="queryParams.qw_number"
                clearable
                @change="handleQuery"
                placeholder="成员类型"
                style="width: 200px"
              >
                <el-option
                  v-for="(item, index) in memberList"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="" prop="keyword">
              <el-select
                v-model="queryParams.qw_number"
                clearable
                @change="handleQuery"
                placeholder="是否好友"
                style="width: 200px"
              >
                <el-option
                  v-for="(item, index) in friendList"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="" prop="keyword">
              <el-date-picker
                v-model="queryParams.times"
                type="daterange"
                range-separator="~"
                start-placeholder="入群开始日期"
                end-placeholder="入群结束日期"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="" prop="keyword">
              <el-select
                v-model="queryParams.qw_number"
                clearable
                @change="handleQuery"
                placeholder="入群方式"
                style="width: 200px"
              >
                <el-option
                  v-for="(item, index) in groupwayList"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </div>
          <el-form-item label="">
            <el-button type="primary" plain>更新群信息</el-button>
          </el-form-item>
        </el-form>
        <el-table v-loading="tableloading" :data="tableList" class="commtable">
          <el-table-column
            label="群成员（备注）"
            prop="userName"
            min-width="240"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
                <div class="flex kh_box">
                  <img
                    src="//qyb-1253970052.cos.ap-shanghai.myqcloud.com/public/wechatdata/avatar/5424982/e9564f7860994fe258a93da3a18c1a2c.png"
                    alt=""
                    class="useravatar"
                  />
                  <div class="khnamebox pl-12">
                    <div class="title c_222333">{{ scope.row.title || '肖成红--' }}</div>
                    <span class="c_f08b00 f-12" style="line-height:normal">@志新</span>
                  </div>
                </div>
            </template>
          </el-table-column>
          <el-table-column
            label="是否好友"
            prop="userName"
            min-width="200px"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.groupusername || "--" }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="入群方式/时间"
            prop="email"
            min-width="200px"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <div>直接邀请入群</div>
              <div class="f-12 c_text3">
                {{ scope.row.time || "2024-03-07 15:23" }}
              </div>
            </template>
          </el-table-column>
          <el-table-column
            label="邀请人"
            prop="email"
            min-width="200px"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.user || "--" }}</span>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- 右边 -->
      <div class="d_right bg_fff br_4">
        <div class="fw-6 c_text2 f-16 r_header plr-16 flex aligncenter">
          行为轨迹
          <span class="f-12 c_text3 fw-0 pl-5"
            >保留近1个月且在线期间的记录</span
          >
        </div>
        <!-- 空 -->
        <EmptyData v-if="!trackList.length" />
        <div v-else class="trackbox">
          <div
            v-for="(item, index) in trackList"
            :key="index"
            class="flex stepitem"
          >
            <div class="step_dot"><span class="dot"></span></div>
            <div class="step_content line_h_24">
              <div>
                新增群标签【舒服舒服的方式】新增群标签【舒服舒服的方式】
              </div>
              <div class="c_text3 f-12">2024-03-11 11:47:22</div>
            </div>
          </div>
          <pagination
            class="pagination flexcenter"
            v-show="total > 0"
            :total="total"
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
            @pagination="getList"
            layout="prev,pager,next"
          />
        </div>
      </div>
    </div>
    <SchemeList v-if="open" :visable.sync="open"/>
  </div>
</template>
<script>
import SchemeList from './SchemeList.vue'
export default {
  data() {
    return {
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      tagList: ["打标签", "群移除标签", "移动标签", "删除标签"],
      trackList: [],
      total: 1,
      memberList: [
        { label: "个人微信", value: 1 },
        { label: "企业微信", value: 2 },
      ],
      friendList: [
        { label: "好友", value: 1 },
        { label: "企业成员", value: 2 },
        { label: "陌生人", value: 3 },
      ],
      groupwayList: [
        { label: "直接邀请入群", value: 1 },
        { label: "链接入群", value: 2 },
        { label: "扫描入群", value: 3 },
      ],
      tableList: [{ id: 1 }],
      tableloading: false,
      open:false
    };
  },
  components:{
    SchemeList
  },
  methods: {
    getList() {},

    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },

    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },

    goBack() {
      this.$router.back();
    },

    handleOpen(){
        this.open = true
    }
  },
};
</script>
<style lang="scss" scoped>
.queryform .el-form-item {
  margin-bottom: 5px;
}
.d_left {
  width: 280px;
  overflow: auto;
}
.pagewarpperbody {
  height: calc(100% - 76px);
}
.d_center {
  width: calc(100% - 653px);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.d_right {
  width: 356px;
  border-left: 1px solid #e9e9e9;
  overflow: auto;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.avatar_info {
  padding: 32px 46px;
  border-bottom: 1px dashed #eeeff6;
}
.avatar_img {
  width: 48px;
  height: 48px;
  border-radius: 2px;
}
.p_box {
  padding: 16px 0;
}
.group_info {
  border-bottom: 1px dashed #eeeff6;
  .item_title {
    width: 60px;
  }
  .infobtn {
    width: 116px;
    text-align: center;
  }
}
.empty_img {
  height: 90px;
}
.tagbox {
  display: inline-block;
  border: 1px solid #e9e9e9;
  margin: 5px 5px 5px 0px;
  height: 24px;
  padding: 0.8px 7px;
}
.r_header {
  height: 50px;
}
.trackbox {
  padding: 16px 32px;
}
.stepitem {
  .step_dot {
    width: 8px;
    height: 8px;
    margin: 13px 16px 0 0;
    .dot {
      display: inline-block;
      width: 100%;
      height: 100%;
      border-radius: 100px;
      background: #3070ff;
    }
  }
  .step_content {
    width: calc(100% - 24px);
  }
}
.pagination {
  ::v-deep .el-pagination {
    position: inherit;
  }
}
.queryform {
  padding: 12px 0;
}
.kh_box {
  max-width: 240px;
}
.khnamebox {
  flex: 1 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>